package com.easylinkin.sm.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;


/**
 * @author zhanchuanfang
 * @since 0.0.1-SNAPSHOT, 2017年7月5日
 * @since 0.1.0-SNAPSHOT,  2018/11/7
 */

@Data
@Entity
@Table(name = "sm_system_config")
@DynamicInsert
@DynamicUpdate
public class SystemConfig implements Serializable {

  /**
   * 安全配置
   */
  public static final int TYPE_SEC = 1;

  /**
   * 邮件配置
   */
  public static final int TYPE_MAIL = 2;

  /**
   * 系统信息配置
   */
  public static final int TYPE_SYS = 3;

  /**
   * 功能配置
   */
  public static final int TYPE_FUNC = 4;

  @Size(max = 128)
  @Id
  @Column(name = "sys_key_", length = 128)
  private String key;

  @Size(max = 256)
  @Column(name = "sys_value_", length = 256)
  private String value;

  @Column(name = "type_")
  private Integer type;

  @Size(max = 256)
  @Column(name = "description_", length = 256)
  private String description;

  public String getKey() {
    return key;
  }

  public void setKey(String key) {
    this.key = key;
  }

  public String getValue() {
    return value;
  }

  public void setValue(String value) {
    this.value = value;
  }

  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

}
